import React, { Component } from 'react';
import { withRouter } from 'react-router-dom'
import { addReadCount } from '../../../actions/newsListActionCreator'
import { connect } from 'react-redux'

function Article(props){
    const {item} = props;
    props.addReadCount(item.key);
    console.log(props)
    this.
    return (
        <div>
            <h3>{item.title}</h3>
            <div> {item.text} </div>
            <p><b>已阅读{item.readCount}次</b> </p>
        </div>
    )
}
Article.defaultProps = {
    text:"moren",
    title:"默认title"
}
export default connect(null,{addReadCount})(withRouter(Article));